ALMaSS  1.0
The Animal, Landscape and Man Simulation System
GooseGreylag_All.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************************************
3 Copyright (c) 2013, Christopher John Topping, University of Aarhus
4 All rights reserved.
5 
6 Redistribution and use in source and binary forms, with or without modification, are permitted provided
7 that the following conditions are met:
8 
9 Redistributions of source code must retain the above copyright notice, this list of conditions and the
10 following disclaimer.
11 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
12 the following disclaimer in the documentation and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
15 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
17 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
19 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 ********************************************************************************************************
23 */
24 #ifndef Goose_Greylag_Base_BaseH
25 #define Goose_Greylag_Base_BaseH
26 
37 //---------------------------------------------------------------------------
38 
39 class Goose_Base;
40 class Landscape;
42 
47 {
48 public:
50  Goose_Greylag_Base(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
52  void Init(Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
54  void ReInit(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
56  virtual ~Goose_Greylag_Base();
57 protected:
65  virtual void ChangeRoost() { m_OurPopulationManager->FindClosestRoost(m_Location_x, m_Location_y, (unsigned) gs_Greylag); }
69  virtual APoint ChooseHopLoc();
70 
71 };
72 
77 {
78 public:
80  Goose_Greylag_FamilyGroup(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost);
82  void Init(Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost);
84  void ReInit(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost);
88  virtual void Step( void );
90  virtual void EndStep(void) { ; }
92  virtual void KillThis(void);
93 };
94 
99 {
100 public:
102  Goose_Greylag_NonBreeder(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
104  void Init(Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
106  void ReInit(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
108  virtual ~Goose_Greylag_NonBreeder();
110  virtual void Step( void );
111 };
112 #endif
TTypeOfGoose_BaseState
Definition: Goose_Base.h:75
A simple class defining an x,y coordinate set.
Definition: ALMaSS_Setup.h:53
A class to describe the goose base.
Definition: Goose_Base.h:132
Goose_Population_Manager * m_OurPopulationManager
This is a time saving pointer to the correct population manager object.
Definition: Goose_Base.h:151
A class to describe the Greylag base.
Definition: GooseGreylag_All.h:47
TTypeOfGoose_BaseState st_ToRoost()
Return to roost and assess whether to forage again that day.
Definition: GooseGreylag_All.cpp:98
void Init(Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Intitialise object.
Definition: GooseGreylag_All.cpp:77
Goose_Greylag_Base(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Goose_Greylag_Base constructor.
Definition: GooseGreylag_All.cpp:68
virtual APoint ChooseHopLoc()
Pick a hop location point within a_dist meters - must be overridden by descendent classes.
Definition: GooseGreylag_All.cpp:121
void ReInit(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
ReInit for object pool.
Definition: GooseGreylag_All.cpp:72
virtual ~Goose_Greylag_Base()
Goose_Greylag_Base destructor.
Definition: GooseGreylag_All.cpp:92
virtual void ChangeRoost()
Find the closest roost.
Definition: GooseGreylag_All.h:65
A class to describe the Greylag family group.
Definition: GooseGreylag_All.h:77
Goose_Greylag_FamilyGroup(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost)
Goose_Greylag_FamilyGroup constructor.
Definition: GooseGreylag_All.cpp:149
virtual void KillThis(void)
The FamilyGroup KillThis must be overridden for families.
Definition: GooseGreylag_All.cpp:205
virtual void EndStep(void)
The Goose_Greylag_FamilyGroup EndStep.
Definition: GooseGreylag_All.h:90
virtual ~Goose_Greylag_FamilyGroup()
Goose_Greylag_FamilyGroup destructor.
Definition: GooseGreylag_All.cpp:161
void ReInit(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost)
ReInit for object pool.
Definition: GooseGreylag_All.cpp:154
void Init(Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost)
Intitialise object.
Definition: GooseGreylag_All.cpp:140
virtual void Step(void)
The Goose_Greylag_FamilyGroup Step.
Definition: GooseGreylag_All.cpp:167
A class to describe the Greylag non-breeder.
Definition: GooseGreylag_All.h:99
void ReInit(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
ReInit for object pool.
Definition: GooseGreylag_All.cpp:247
Goose_Greylag_NonBreeder(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Goose_Greylag_NonBreeder constructor.
Definition: GooseGreylag_All.cpp:231
void Init(Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Intitialise object.
Definition: GooseGreylag_All.cpp:237
virtual void Step(void)
The Goose_Greylag_NonBreeder Step.
Definition: GooseGreylag_All.cpp:259
virtual ~Goose_Greylag_NonBreeder()
Goose_Greylag_NonBreeder destructor.
Definition: GooseGreylag_All.cpp:253
The class to handle all goose population related matters.
Definition: Goose_Population_Manager.h:393
void FindClosestRoost(int &a_x, int &a_y, unsigned a_type)
Changes a_x & a_y to the location of the nearest roost of a_type to a_x, a_y.
Definition: Goose_Population_Manager.cpp:1000
The landscape class containing all environmental and topographical data.
Definition: landscape.h:113
int m_Location_y
Definition: PopulationManager.h:228
int m_Location_x
Definition: PopulationManager.h:225